import myaxios from "../MyAxios";
import URLENV from "@/http/BaseUrl";
const JSFURL = URLENV.JSFURL;

const MallApi = {
    // 商品列表
    mallLsit(params) {
        let url = JSFURL + '/product/product_list'
        return myaxios.get(url,params)
    },

    // 新增商品
    mallAdd(params){
        let url=JSFURL+'/product/product_Add'
        return myaxios.post(url,params)
    },

    // 删除商品
    delete(params){
        let url=JSFURL+'/product/product_del'
        return myaxios.get(url,params)
    },

    // 通过id查询
    query(params){
        let url=JSFURL+'/product/product_id'
        return myaxios.get(url,params)
    },

    // 修改商品
    update(params){
        let url=JSFURL+'/product/product_update'
        return myaxios.post(url,params)
    },

    /** 模糊查询列表 */
    queryProductByName(params){
        let url = JSFURL + '/product/by_ptname'
        return myaxios.get(url,params)
    }
}

export default MallApi
